package com.design.pattern.strategy;

/**
 * @Description 打折的逻辑
 * @author ll
 * @createTime 2021/5/31  23:47 
 */
public class CrashRebate extends Crash {

	/**
	 * 打折
	 */
	private double discount = 1d;

	public CrashRebate(String str){
		this.discount = Double.parseDouble(str);
	}

	@Override
	public double resultCrash(double money) {
		return discount*money;
	}
}
